home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-03
/
qbasicpg.zip
/
LOCAL.BAS
< prev
next >
Wrap
BASIC Source File
|
1989-08-31
|
568b
|
26 lines
' LOCAL.BAS
' This program demonstrates the use of a local variable.
DECLARE SUB AddGame () ' declare AddGame subprogram
game$ = "Chess" ' initialize game$ with value of "Chess"
CLS
PRINT " In the main program, game$ = "; game$ ' display in main prog.
AddGame ' display in subprogram
PRINT " Back in the main program, game$ = "; game$ ' display in main prog.
END
SUB AddGame
game$ = game$ + " and backgammon"
PRINT "In the AddGame subprogram, game$ = "; game$
END SUB